﻿using System;

namespace Framework.Network
{

    public class ChannelEvent
    {
        public Object content;
        public Action<Object> OnConnect { get; set; }
        public Action<Object,byte[]> OnMessage { get; set; }
        public Action<Object> OnClose { get; set; }
        public Action<Object,string> OnError { get; set; }
        
        public Func<object,byte[]> OnHeartbeat { get; set; }

        public float HeartbeatTime=0;

        public void Clear()
        {
            HeartbeatTime = 0;
            OnConnect = null;
            OnClose = null;
            OnMessage = null;
            OnError = null;
            OnHeartbeat = null;
        }
    }

}